@layout("/common/_container.html",{js:["/assets/basic/basicPutgoods/basicPutgoods.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">Delivery Unit Management</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
		                        <select id="putgoodsCustomerId">
                            <option value="">Select Customer</option>
		                            @for(item in basicCustomerList!){
		                            <option value="${item.id}">${item.customerName}</option>
		                            @}
		                        </select>
                            </div>
				            <div class="layui-inline">
				                <input id="condition" class="layui-input" type="text" placeholder="Unit Name"/>
				            </div>
				            <div class="layui-inline">
				                <input id="unitNumber" class="layui-input" type="text" placeholder="Unit Number"/>
				            </div>
		                    <div class="layui-inline">
		                        <select id="unitCategory">
                            <option value="">Select Unit Category</option>
						    <option value="Receiving">Receiving</option>
						    <option value="Shipping">Shipping</option>
                        </select>
		                    </div>
                            <div class="layui-inline">
		                        <select id="unitType">
                            <option value="">Select Unit Type</option>
		                            @for(item in dictlist!){
		                            <option value="${item.name}">${item.name}</option>
		                            @}
		                        </select>
                            </div>
				            <div class="layui-inline">
				                <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>Search</button>
				                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>Add</button>
								@if(shiro.hasPermission("/basicPutgoods/export")){
									<button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>Export</button>
								@}
								<button id="btnExpimport" class="layui-btn icon-btn"><i class="layui-icon">&#xe67c;</i>Import Excel</button>
								<button id="zongjuli" class="layui-btn layui-btn-normal icon-btn"><i class="layui-icon">&#xe716;</i>Calculate Total Delivery Distance</button>
				                <button id="btnExpimportUpdate" class="layui-btn icon-btn"><i class="layui-icon">&#xe67c;</i>Import Update Excel</button>
				                <button id="weChat" class="layui-btn icon-btn layui-btn-warm"><i class="layui-icon">&#xe677;</i>Unit WeChat Registration Code</button>
				            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="basicPutgoodsTable" lay-filter="basicPutgoodsTable"></table>
                    <table class="layui-table" id="basicAddressTable" lay-filter="basicAddressTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<input id="putgoodsId" type="hidden">

<script type="text/html" id="tableBar">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">Edit</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">Delete</a>
</script>
<script type="text/html" id="tableBarAddress">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="editAddress">Edit</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="deleteAddress">Delete</a>
</script>
<script type="text/html" id="toolbarfromAddress">
            <div class="layui-inline">
                <button id="btnAddAddress" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>Add Detailed Address</button>
            </div>
</script>

<script type="text/html" id="switchWlTpl">
    <input type="checkbox" lay-filter="switchWl" value="{{d.id}}" lay-skin="switch" lay-text="Enabled|Disabled" {{d.switchWl=='1'?'checked':''}} />
</script>



@}